package com.yoyo.ad.confusion;

import android.view.ViewGroup;

import com.yoyo.ad.main.IAdBannerListener;
import com.yoyo.ad.main.IAdFactory_;
import com.yoyo.ad.main.IAdInteractionListener;
import com.yoyo.ad.main.IAdView;

public class EmptyAdFactory implements IAdFactory_ {

    private IAdView mAdView;
    private IAdBannerListener mAdBannerListener;
    private IAdInteractionListener mAdInteractionListener;
    private static final String AD_EMPTY = "AD_EMPTY";

    @Override
    public void setAdView(IAdView adBannerListener) {
        mAdView = adBannerListener;

    }

    @Override
    public void setAdBannerListener(IAdBannerListener adBannerListener) {
        mAdBannerListener = adBannerListener;
    }

    @Override
    public void setAdInteractionListener(IAdInteractionListener adInteractionListener) {
        mAdInteractionListener = adInteractionListener;
    }

    @Override
    public void setConfig(long adId, int adPositionId, boolean isIpReport) {

    }

    @Override
    public void getYoyoAd(int position, int requestCode, int size, String adPlaceId, int type) {
        mAdView.adFail(requestCode, AD_EMPTY);
    }

    @Override
    public void getExpressAd(int position, int requestCode, String adPlaceId, int size, int width) {
        mAdView.adFail(requestCode, AD_EMPTY);
    }

    @Override
    public void getBanner(int position, int requestCode, String adPlaceId, ViewGroup adsParent, int width, int height) {
        mAdBannerListener.adFail(requestCode, AD_EMPTY);
    }

    @Override
    public void getInteraction(int position, int requestCode, String adPlaceId) {
        mAdInteractionListener.adFail(requestCode, AD_EMPTY);
    }

    @Override
    public void onDestroy() {

    }

}
